// 方法一 等价替换
let a = 3,
    b = 5,
    c = b;

b = a;
a = c;

// 方法二 加减法
let a = 3,
    b = 5;

a = a + b;
b = a - b;
a = a - b;


// 方法三 数组法
let a = 3,
    b = 5;

a = [a, b];
b = a[0];
a = a[1];

// 方法四 对象法
let a = 3,
    b = 5;

a = {a:b, b:a}
b = a.b;
a = a.a;

// 方法五 数组运算法
let a = 3,
    b = 5;

a = [b, b=a][0]; 

// 方法六 按位异或法
let a = 3,
    b = 5;

a ^= b
b ^= a
a ^= b

// 方法七 解构赋值
let a = 3,
    b = 5;

[a,b] = [b,a]
